<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>process进度条</title>
</head>
<body>
<h4>加载进度</h4>
<input type="button" value="下载" onclick="downloadStart();" />
<progress id="download" value="" max="100"></progress>
<script>
  function downloadStart() {
    var down = document.getElementById("download"),
      i = 0,
      intervalId;
      intervalId = setInterval(function () {
        i += 10
        down.value = i;
        if (i == 100) {
          clearInterval(intervalId);
        }
    }, 500)
  }

</script>
</body>
</html>
